<?xml version="1.0" encoding="UTF-8" ?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	template="/WEB-INF/templates/general.xhtml">

<!-- 	<ui:define name="title"> -->
<!-- 		<h:outputText value="Please Sign In" /> -->
<!-- 	</ui:define> -->
<!-- 	<ui:define name="header"> -->
<!-- 		<h:outputText value="Please Sign In" /> -->
<!-- 	</ui:define> -->

	<ui:define name="content">
		<div id="loginFormContainer">
			<h:form id="loginForm">
				<p:fieldset styleClass="fieldset">
					<h:panelGrid id="logPanelGridTitle"
						style="margin: 0 auto; text-align: right"
						cellspacing="8" columns="3">
						<h:outputText value="Inicia Sesión" />
					</h:panelGrid>
					<!-- Foco en el primer campo del form -->
					<p:focus/>
					<p:messages id="messages"/>

					<h:panelGrid id="logPanelGrid"
						style="margin: 0 auto; margin-top: 25px; text-align: right"
						cellspacing="8" columns="3">
						<h:panelGroup>
							<h:outputText value="User Name:" />
							<h:outputText style="color:red" value="*  " />
						</h:panelGroup>
						<p:inputText id="userName" value="#{user.userName}" required="true"
							label="User Name" title="Enter your User Name!" />
						<p:tooltip for="userName" styleClass="tooltip" showEvent="focus"
							hideEvent="blur" />

						<h:panelGroup>
							<h:outputText value="Enter Password:" />
							<h:outputText style="color:red" value="*  " />
						</h:panelGroup>
						<p:password id="pass" value="#{user.password}" required="true" label="Password"
							title="Please enter a password!" />
						<p:tooltip for="pass" styleClass="tooltip" showEvent="focus"
							hideEvent="blur" />

						<p:commandButton id="newUserButton" action="newUser"
							immediate="true" icon="ui-icon-plus" value="Sign Up" />
						<p:commandButton id="submitButton" action="confirmSignIn"
							update="logPanelGrid,messages" icon="ui-icon-check"
							value="Sign In" />

					</h:panelGrid>
				</p:fieldset>
			</h:form>
		</div>
	</ui:define>

</ui:composition>